package com.lhd.service.impl;

import com.lhd.mapper.UserGoodMapper;
import com.lhd.service.UserGoodService;
import com.lhd.utils.ThreadLocalUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class UserGoodServiceImpl implements UserGoodService {
    @Autowired
    UserGoodMapper userGoodMapper;
    @Override
    public void add(Integer gid) {
        Map<String,Object> map = ThreadLocalUtil.get();
        Integer uid = (Integer) map.get("id");
        userGoodMapper.add(uid,gid);
    }
}
